#ifndef AHXGWNET_THREADMUTEX_H_
#define AHXGWNET_THREADMUTEX_H_

namespace ahxgwnet {

class ThreadMutex
{
public:
    ThreadMutex();
    ~ThreadMutex();
    void lock();
    void unlock();
    
private:
    pthread_mutex_t m_mutex;
};

class ThreadGuard
{
public:
    ThreadGuard(ThreadMutex *mutex);
    ~ThreadGuard();
    
private:
    ThreadMutex *m_mutex;
};

}

#endif
